<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="layout :: htmlhead" th:with="title='流程管理'"></head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头-->
    <div th:replace="fragments/head :: header"></div>

    <div class="layui-body" style="margin: 1%">
        <div class="demoTable">
            &nbsp;&nbsp;
        </div>

        <div id="permTable" class="grid">
        </div>
            
			任务管理
			<hr class="layui-bg-cyan"/>
		    
		    <table class="layui-table">
                <thead>
                <tr>
                    <th>任务id</th>
                    <th>任务名称</th>
                    <th>办理人</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="task: ${tasks}">
				<td th:text="${task?.id}">id</td>
				<td th:text="${task?.name}">name</td>
				<td th:text="${task?.assignee}">assignee</td>
				<td th:text="${#dates.format(task?.createTime,'yyyy-MM-dd HH:mm')}">2000-01-01 10:10</td>
				<td>
				 <a class="layui-btn layui-btn-primary layui-btn-xs" th:href="@{/workflow/viewTaskForm(taskId=${task.id})}">办理任务</a>
                 <a class="layui-btn layui-btn-primary layui-btn-xs" th:href="@{/workflow/viewCurrentImage(taskId=${task.id})}">查看当前流程</a>
                </td>
				</tr>
                </tbody>
            </table>
    </div>


    <!--底部-->
    <div th:replace="fragments/footer :: footer"></div>
</div>
</body>
</html>